package com.kgc.storeprovider.controller;

import com.kgc.basic.util.ResponseMsg;
import com.kgc.store.pojo.InventoryLossDetail;
import com.kgc.store.remote.InventoryLossDetailRemote;
import com.kgc.storeprovider.service.InventoryLossDetailService;
import com.kgc.storeprovider.service.InventoryLossService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class InventoryLossDetailController implements InventoryLossDetailRemote {

    private Logger logger = LoggerFactory.getLogger(getClass());
    @Autowired
    private InventoryLossDetailService inventoryLossDetailService;

    @Override
    public ResponseMsg getInventoryLossDetailList(String inventoryLossCode) {
        logger.info("InventoryLossDetailController getInventoryLossDetailList inventoryLossCode:"+inventoryLossCode);
        ResponseMsg msg = inventoryLossDetailService.getInventoryLossDetailList(inventoryLossCode);
        logger.debug("InventoryLossDetailController getInventoryLossDetailList msg:"+msg);
        return msg;
    }

    @Override
    public ResponseMsg delInventoryLossDetail(String inventoryLossCde) {
        logger.info("InventoryLossDetailController delInventoryLossDetail inventoryLossCde:"+inventoryLossCde);
        ResponseMsg msg = inventoryLossDetailService.delInventoryLossDetail(inventoryLossCde);
        logger.debug("InventoryLossDetailController delInventoryLossDetail msg:"+msg);
        return msg;
    }

    @Override
    public ResponseMsg insertInventoryLossDetail(InventoryLossDetail inventoryLossDetail) {
        logger.info("InventoryLossDetailController insertInventoryLossDetail inventoryLossDetail:"+inventoryLossDetail);
        ResponseMsg msg = inventoryLossDetailService.insertInventoryLossDetail(inventoryLossDetail);
        logger.debug("InventoryLossDetailController insertInventoryLossDetail msg:"+msg);
        return msg;
    }
}
